package sortAlgorithm.comparable;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.ToString;

/**
 * @author： pang-yun
 * @date： 2021-09-25 13:12
 * 功能目的 ：用于
 */

@Data
@AllArgsConstructor
@ToString
public class Student implements Comparable<Student> {
    private String username;
    private int age;

    @Override
    public int compareTo(Student o) {
        return this.getAge() - o.getAge();
    }
}
